//
//  ButtonsView.m
//  AudioBook_A
//
//  Created by Sansan on 15/4/13.
//  Copyright (c) 2015年 Sansan. All rights reserved.
//

#import "ButtonsView.h"

@implementation ButtonsView


// 初始化
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    
    return self;
}


- (void)creatView
{
    
    // 设置一个有声小说的UIImageView
    self.audioNovel = [[UIImageView alloc] initWithFrame:CGRectMake(75, 0, 75, 75)];
    NSURL *url = [NSURL URLWithString:@"http://fdfs.xmcdn.com/group4/M00/36/DF/wKgDs1NE5Anjeg1JAAAYUiEbr9U459.png"];
    [self.audioNovel sd_setImageWithURL:url];
    [self addSubview:self.audioNovel];
    
    //全部
    self.allType = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 75, 75)];
    [self.allType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group3/M0A/4A/90/wKgDslNE456TozjgAAAcSrT-F7I943.png"]];
    [self addSubview:self.allType];
    
    self.musicType = [[UIImageView alloc] initWithFrame:CGRectMake(150, 0, 75, 75)];
    [self.musicType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group4/M02/3A/45/wKgDtFNE5HbizuFhAAAahRJiBZk361.png"]];
    [self addSubview:self.musicType];
    
    self.entertainmentType = [[UIImageView alloc] initWithFrame:CGRectMake(225, 0, 75, 75)];
    [self.entertainmentType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group6/M02/7E/51/wKgDhFT9SH7RM00nAAAb9jymwXY586.png"]];
    [self addSubview:self.entertainmentType];
    
    self.comicType = [[UIImageView alloc] initWithFrame:CGRectMake(300, 0, 75, 75)];
    [self.comicType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group3/M09/4A/91/wKgDslNE5Fqg_hGoAAAe_pdly3Y918.png"]];
    [self addSubview:self.comicType];
    
    self.emotionType = [[UIImageView alloc] initWithFrame:CGRectMake(0, 75, 75, 75)];
    [self.emotionType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group3/M0A/4A/9D/wKgDslNE8BSRSx6kAAAaufobNi8859.png"]];
    [self addSubview:self.emotionType];
    
    self.cultureType = [[UIImageView alloc] initWithFrame:CGRectMake(75, 75, 75, 75)];
    [self.cultureType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group4/M02/3A/45/wKgDtFNE5NPgyo5fAAAc6sHqmBc738.png"]];
    [self addSubview:self.cultureType];
    
    self.baijiaType = [[UIImageView alloc] initWithFrame:CGRectMake(150, 75, 75, 75)];
    [self.baijiaType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group3/M0A/4A/91/wKgDslNE5Y6BvI5SAAAcgP73qWQ772.png"]];
    [self addSubview:self.baijiaType];
    
    self.schoolType = [[UIImageView alloc] initWithFrame:CGRectMake(225, 75, 75, 75)];
    [self.schoolType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group6/M02/82/2B/wKgDg1T9SKiwyy5DAAAY6rtpQeg834.png"]];
    [self addSubview:self.schoolType];
    
    self.radioType = [[UIImageView alloc] initWithFrame:CGRectMake(300, 75, 75, 75)];
    [self.radioType sd_setImageWithURL:[NSURL URLWithString:@"http://fdfs.xmcdn.com/group4/M01/3A/48/wKgDtFNE5xyCHW0XAAAfoc0To8w469.png"]];
    [self addSubview:self.radioType];
    
    
}





/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
